#include "MyMessage.h"

configuration routeDiscoveryAppC{}

implementation{
  components MainC,routeDiscoveryC as App;
  components new AMSenderC(AM_RADIO_COUNT);
  components new AMReceiverC(AM_RADIO_COUNT);
  components ActiveMessageC;
  components new TimerMilliC();
 
  //Interfacce di boot
  App.Boot -> MainC.Boot;

  //Iterfacce send e receive
  App.Receive -> AMReceiverC;
  App.AMSend -> AMSenderC;

  //Controllo della radio
  App.SplitControl -> ActiveMessageC;

  //Interfacce per accedere ai campi dei pacchetti
  App.AMPacket -> AMSenderC;
  App.Packet -> AMSenderC;
  App.PacketAcknowledgements->ActiveMessageC;

  //Interfaccia timer
  App.MilliTimer -> TimerMilliC;
  
}

